enabled: visible
onClicked: NC.Systray.createResolveConflictsDialog(activityModel.allConflicts);
}
+
+ Button {
+ Layout.rightMargin: Style.trayHorizontalMargin
+
+ text: qsTr("Open browser")
+
+ visible: NC.UserModel.currentUser.needsToSignTermsOfService
+ enabled: visible
+
+ onClicked: NC.UserModel.openCurrentAccountServer()
+ }
}
return (_account->connectionStatus() == AccountState::ConnectionStatus::Connected);
}
+bool User::needsToSignTermsOfService() const
+{
+ return _account->connectionStatus() == AccountState::ConnectionStatus::NeedToSignTermsOfService;
+}
+
bool User::isDesktopNotificationsAllowed() const
{
Q_PROPERTY(QString featuredAppAccessibleName READ featuredAppAccessibleName NOTIFY featuredAppChanged)
Q_PROPERTY(QString avatar READ avatarUrl NOTIFY avatarChanged)
Q_PROPERTY(bool isConnected READ isConnected NOTIFY accountStateChanged)
+ Q_PROPERTY(bool needsToSignTermsOfService READ needsToSignTermsOfService NOTIFY accountStateChanged)
Q_PROPERTY(UnifiedSearchResultsListModel* unifiedSearchResultsListModel READ getUnifiedSearchResultsListModel CONSTANT)
Q_PROPERTY(QVariantList groupFolders READ groupFolders NOTIFY groupFoldersChanged)
[[nodiscard]] AccountStatePtr accountState() const;
[[nodiscard]] bool isConnected() const;
+ [[nodiscard]] bool needsToSignTermsOfService() const;
[[nodiscard]] bool isCurrentUser() const;
void setCurrentUser(const bool &isCurrent);
[[nodiscard]] Folder *getFolder() const;